package com.example.demo.Util;

public class Utils {
    //字符串反转
    public static String reverse(String str){
        if(str.length()<=1){
            return str;
        }
        return reverse(str.substring(1))+str.substring(0,1);
    }
    //字符串编码转换
    public static String stringCharsetChange(String str)throws Exception{
        return new String(str.getBytes("GB2312"),"ISO-8859-1");
    }
}
